import http from '@/utils/http'

import type {
  HomeArticleParams,
  HomeArticle,
  DoctorData,
  DoctorParams,
  likeParams
} from '@/types/home'

export function getHomeKnowledgeApi(params: HomeArticleParams) {
  return http.get<HomeArticle>('/patient/home/knowledge', params)
}

export function getHomeDoctorApi(params: DoctorParams) {
  return http.get<DoctorData>('/home/page/doc', params)
}

export function likeApi(data: likeParams) {
  return http.post<{ id: string }>('/like', data)
}
